// This file is part of Indico.
// Copyright (C) 2002 - 2025 CERN
//
// Indico is free software; you can redistribute it and/or
// modify it under the terms of the MIT License; see the
// LICENSE file for more details.

@use 'base/palette' as *;

.previewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 55em;

  &.loading {
    opacity: 0.5;
  }

  :global(.ui.pagination.menu).pagination {
    margin-top: 1.4em;
  }

  :global(.react-pdf__Document) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  :global(.react-pdf__Page) {
    max-width: calc(100% - 2em);
    border: 1px solid $pastel-gray;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
    margin: 1em 0 0 0;

    canvas {
      max-width: 100%;
      height: auto !important;
    }
  }

  :global(.textLayer) {
    display: none;
  }
}
